/*
 Navicat Premium Data Transfer

 Source Server         : 192.168.1.75
 Source Server Type    : SQL Server
 Source Server Version : 15002000
 Source Host           : 192.168.1.75:1433
 Source Catalog        : dj
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 15002000
 File Encoding         : 65001

 Date: 05/09/2024 10:01:53
*/


-- ----------------------------
-- Table structure for stock_count_record
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[stock_count_record]') AND type IN ('U'))
	DROP TABLE [dbo].[stock_count_record]
GO

CREATE TABLE [dbo].[stock_count_record] (
  [id] varbinary(1)  NOT NULL,
  [material] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [materialSum] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [nextMaterial] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [deductionSum] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [strTime] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [type] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [next_type] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[stock_count_record] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'料号',
'SCHEMA', N'dbo',
'TABLE', N'stock_count_record',
'COLUMN', N'material'
GO

EXEC sp_addextendedproperty
'MS_Description', N'库存数',
'SCHEMA', N'dbo',
'TABLE', N'stock_count_record',
'COLUMN', N'materialSum'
GO

EXEC sp_addextendedproperty
'MS_Description', N'下一级',
'SCHEMA', N'dbo',
'TABLE', N'stock_count_record',
'COLUMN', N'nextMaterial'
GO

EXEC sp_addextendedproperty
'MS_Description', N'下一级需要扣除的库存数',
'SCHEMA', N'dbo',
'TABLE', N'stock_count_record',
'COLUMN', N'deductionSum'
GO

EXEC sp_addextendedproperty
'MS_Description', N'计算时间',
'SCHEMA', N'dbo',
'TABLE', N'stock_count_record',
'COLUMN', N'strTime'
GO

EXEC sp_addextendedproperty
'MS_Description', N'料号类型',
'SCHEMA', N'dbo',
'TABLE', N'stock_count_record',
'COLUMN', N'type'
GO

EXEC sp_addextendedproperty
'MS_Description', N'下一级料号类型',
'SCHEMA', N'dbo',
'TABLE', N'stock_count_record',
'COLUMN', N'next_type'
GO

EXEC sp_addextendedproperty
'MS_Description', N'现存量计算过程记录表',
'SCHEMA', N'dbo',
'TABLE', N'stock_count_record'
GO


-- ----------------------------
-- Primary Key structure for table stock_count_record
-- ----------------------------
ALTER TABLE [dbo].[stock_count_record] ADD CONSTRAINT [PK__stock_co__3213E83F91B55157] PRIMARY KEY CLUSTERED ([id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO

